package com.gms.service.placemanager;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.gms.entity.place.PlaceApply;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public interface PlaceApplyService extends IService<PlaceApply> {
    /*
    * 预约场地
    * */
    public void InsertPlaceApply(PlaceApply placeApply);
    /*
    * 预约退订-失约处理
    * */
    public void DeletePlaceApply(Integer applyid,String state);
    /*
    * 修改赛事
    * */
    public void UpdateApply(String oldeventid,String neweventid);
    /*
    * 修改预约状态--场地预约审核
    * */
    public void UpdatePlaceApplyState(Integer applyid,String eventid,String type,String state);
    /*
    * 查询可预约场地-分页查询--场地编号--时间
    * */
    public List<PlaceApply> QueryPlaceApplyByPage(String placeId, Date time);
    /*
    * 根据状态查询-分页查询
    * */
    public List<PlaceApply> QueryDismissPlaceApply(String state);
    /*
    * 根据一卡通号查询场地
    * */
    public List<PlaceApply> QueryPlaceApplyByUser(String number,String type,String state,String placetype,String storey);
    /*
    * 一周信息查询--分页查询--开始时间--结束时间--场地楼层--场地类型
    * */
    public List<PlaceApply> QueryWeekApplyById(Date timeStart,Date timeEnd,String storey,String type,String state);
    /*
    * 场地使用--开始时间--结束时间
    * */
    public void InsertUseTime(Integer applyid,String timeStart,String timeEnd);
    /*
     * 查询待使用的场地--今天--用户
     * */
    public List<PlaceApply> SelectPlaceApplyByNow(String number,Date date);
    /*
    * 查询可退订的预约信息--用户
    * */
    public List<PlaceApply> SelectPlaceApplyByUser(String number,Date date);
    /*
    * 场地使用
    * */
    public void UpdatePlaceApply(Integer applyid,String starttime);
    /*
    * 遍历数据库修改数据
    * */
    public void UpdateAllPlaceApply();
    /*
    * 查询赛事的场地安排
    * */
    public List<PlaceApply> SelectEventPlace(String eventid);
}
